var script = "<script type='text/javascript' language='javascript' >";
	script += "function testfun() {alert('hello')}";
	script += "</script>";
	script += "<script></script>";
	
function aaaa() {
	var panel = document.getElementById("panel");
	var module = document.createElement("div");
	module.id = "moduleId";
	panel.appendChild(module);
	createModuleContent(module);
}
function createModuleContent(module) {
	var iframe = document.createElement("iframe");
	module.appendChild(iframe);
	var win = iframe.contentWindow;
	var doc = win.document;
	
	var header = document.createElement("div");
	var content = document.createElement("div");
	module.appendChild(header);
	module.appendChild(content);
	
	header.style.cssText = content.style.cssText = 
		"margin:3px;padding:3px;border:1px solid gray";
	
}
